<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$language.position_feedback} - {$config.site_name}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="keywords" content="{$config.site_keywords|escape:html}" />
<meta name="description" content="{$config.site_description|escape:html}" />
<link rel="stylesheet" href="templates/{$config.site_template}/style.css" />
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript">
function feedback_post(){
    if($('#feedback_authcode').val()==''){
            alert('{$language.feedback_authcode_is_empty}');
            return false;
    }
    if($('#feedback_name').val()==''){
            alert('{$language.feedback_name_is_empty}');
            return false;
    }
    if($('#feedback_content').val()==''){
            alert('{$language.feedback_content_is_empty}');
            return false;
    }
}
function on_focus(obj,text){
    if($(obj).val()==text){
            $(obj).val('');
    }
    $(obj).css('color','#000');
}
function on_blur(obj,text){
    if($(obj).val()==''){
            $(obj).val(text);
    }
    $(obj).css('color','#999');
}
</script>
</head>
<body>
{include file="header.html"}
<div id="middle">
	<div id="main">
		<div class="box">
{if $feedback}
            {foreach from=$feedback item=feedback}
                    <div class="feedback_list">
                    <div class="feedback_caption">
                            <span>{$feedback.name}</span>&nbsp;
                            <small>({$feedback.address},{$feedback.time})</small>
                    </div>
                    <div class="feedback_content">
                            {$feedback.content}
                            {if $feedback.reply}
                                    <div class="feedback_reply"><b>{$language.form_feedback_reply}</b><br/>{$feedback.reply}&nbsp;<small>({$feedback.reply_time})</small></div>
                            {/if}
                    </div>
                    </div>
            {/foreach}
            {$pagebar}
{/if}
<form action="feedback.php?action=insert" method="post" onsubmit="return feedback_post()">
<table cellpadding="0" cellspacing="0">
<tr>
    <td height="40" colspan="2"><input type="text" name="feedback_name" id="feedback_name" style="width:120px;" class="txt" value="{if $smarty.session.member_nickname}{$smarty.session.member_nickname}{else}{$language.form_feedback_name}{/if}" onfocus="on_focus(this,'{$language.form_feedback_name}')" onblur="on_blur(this,'{$language.form_feedback_name}')" /></td>
</tr>
<tr>
    <td colspan="2"><textarea id="feedback_content" name="feedback_content" style="width:675px;height:82px;" class="textarea" onfocus="on_focus(this,'{$language.form_feedback_content}')" onblur="on_blur(this,'{$language.form_feedback_content}')">{$language.form_feedback_content}</textarea></td>
</tr>
<tr>
<td height="40"><input type="text" name="feedback_authcode" id="feedback_authcode" style="width:120px;" class="txt"onfocus="on_focus(this,'{$language.form_feedback_authcode}')" onblur="on_blur(this,'{$language.form_feedback_authcode}')" value="{$language.form_feedback_authcode}"/>&nbsp;<img src="authcode.php" alt="" align="absmiddle" onclick="this.src+='?'+Math.random()"/>
</td>
<td align="right">
    <input type="submit" id="feedback_submit" value="{$language.submit}" class="button"/>
</td>
</tr>
</table>
</form>
		</div>
	</div>
	<div id="in"></div>
	<div id="side">
	
	</div>
	<div class="clear"></div>
</div>
{include file="footer.html"}
</body>
</html>